function shallowClone(obj) {
  const tempObj = {}
  for (const key in obj) {
    if (Object.hasOwnProperty.call(obj, key)) {
      tempObj[key]= object[obj];
    }
  }
  return tempObj
}

function deepClone (obj,obj2) {
  const resObj = obj2 || {}
  for (const key in obj) {
    if (typeof obj[key] === 'object') {
      if (Array.isArray(obj[key])) {
        resObj[key] = []
      } else {
        resObj[key] = {}
      }
      arguments.callee(obj[key],resObj[key])
    } else {
      obj[key] = resObj[key]
    }
  }
  return resObj
}
